# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ppfuzz
pkgver=31.80982ec
pkgrel=1
pkgdesc='A fast tool to scan client-side prototype pollution vulnerability written in Rust.'
arch=('x86_64' 'aarch64')
groups=('blackarch' 'blackarch-webapp' 'blackarch-scanner')
url='https://github.com/dwisiswant0/ppfuzz'
license=('MIT')
makedepends=('git' 'cargo')
source=("$pkgname::git+https://github.com/dwisiswant0/$pkgname.git")
options=(!strip)
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  cargo build --release
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" *.md
}

